//
//  ImageAndTextDetailController.m
//  OnionHome
//
//  Created by fengjie on 2019/9/22.
//  Copyright © 2019 FengJie. All rights reserved.
//

#import "ImageAndTextDetailController.h"
#import "AnswerDetailCommentsCell.h"
#import "HomeSerachController.h"

@interface ImageAndTextDetailController ()<UITableViewDelegate,UITableViewDataSource>
/**listView*/
@property (nonatomic,strong)UITableView*listView;
/**底部输入框视图*/
@property (nonatomic,strong)CommentsBottomView*bottomView;
/**键盘上面评论输入框*/
@property (nonatomic,strong)PubulicInputToolbar*inputToolbar;

@end



@implementation ImageAndTextDetailController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addNavigationItemWithImageNames:@[@"sangedian",@"ic_nav_search"] isLeft:NO target:self action:@selector(rightAction:) tags:@[@100,@101]];
    [self.view addSubview:self.listView];
    [self.view addSubview:self.bottomView];
    [self.view addSubview:self.inputView];
    
    [self.listView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.mas_equalTo(0);
        make.bottom.mas_equalTo(self.bottomView.mas_top);
    }];

    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(0);
    }];
    [self setTextViewToolbar];
    
}
-(void)setTextViewToolbar {

    [self.view addSubview:self.inputToolbar];

}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self setNavBarBackgroundAndNotClearColor];
    [self setIQKeyboardManagerEnable:NO];
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self setIQKeyboardManagerEnable:YES];
}
-(void)rightAction:(UIButton *)button{
    DLog(@"%ld",(long)button.tag);
    if (button.tag == 101) {
        BasseNavigationController * nav = [[BasseNavigationController alloc] initWithRootViewController:[HomeSerachController new]];
        [self.navigationController presentViewController:nav animated:YES completion:nil];

    }else if (button.tag == 100){
        PresentationObject * object = [PresentationObject sharedPresentationObject];
        object.subViewFrame = CGRectZero;
        [object showPresentingViewController:self PresentedViewController:[[BasseNavigationController alloc]initWithRootViewController:[ShareViewController new]]];

    }
}
-(void)setModel:(HomeRecomedModel *)model{
    _model = model;
}
-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
    DLogFunc;
    [self.view endEditing:YES];
}

#pragma mark --UITableViewDelegate,UITableViewDataSource
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 3;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    if (section == 0 || section == 1) {
        return 2;
    }
    return 9;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 0.01;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    if (section == 0) {
        return 0.01;
    }
    if (section == 1 || section == 2) {
        return 50;
    }

    return 8;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    if (section == 1 || section == 2) {
        UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
        view.backgroundColor = KWhiteColor;
        UILabel * label = UILabel.new;
        if (section == 1) {
            label.text = @"相关推荐";
        }
        if (section == 2) {
            label.text = @"评论(9)";
        }
        label.textColor = UIColorFromRGB(0x273323);
        label.font = SYSTEMFONT(16);
        
        [view addSubview:label];
        
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(16);
            make.centerY.mas_equalTo(0);
        }];
        return view;
    }

    return [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 0.01)];;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    return [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 0.01)];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    ImageAndTextDetailOneCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([ImageAndTextDetailOneCell class])];
    AdvertisingCell * twocell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([AdvertisingCell class])];
    
    leftTextAnRightImageViewCell * therecell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([leftTextAnRightImageViewCell class])];
    
    AnswerDetailCommentsOneCell * fourecell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([AnswerDetailCommentsOneCell class])];
    fourecell.authorLb.hidden = YES;

    if (indexPath.section ==0 && indexPath.row == 1) {
        return twocell;
    }
    if (indexPath.section == 1) {
        return therecell;
    }
    if (indexPath.section == 2) {
        return fourecell;
    }
    cell.model = self.model;;
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
}
-(UITableView*)listView{
    if(!_listView){
        _listView=[[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
        _listView.delegate = self;
        _listView.dataSource = self;
        _listView.tableFooterView = UIView.new;
        _listView.rowHeight = UITableViewAutomaticDimension;
        _listView.estimatedRowHeight = 44.0f;
        [_listView registerClass:[ImageAndTextDetailOneCell class] forCellReuseIdentifier:NSStringFromClass([ImageAndTextDetailOneCell class])];
        [_listView registerClass:[AdvertisingCell class] forCellReuseIdentifier:NSStringFromClass([AdvertisingCell class])];
        [_listView registerClass:[leftTextAnRightImageViewCell class] forCellReuseIdentifier:NSStringFromClass([leftTextAnRightImageViewCell class])];
        [_listView registerClass:[AnswerDetailCommentsOneCell class] forCellReuseIdentifier:NSStringFromClass([AnswerDetailCommentsOneCell class])];
    }
    return _listView;
}

-(PubulicInputToolbar*)inputToolbar{
    if(!_inputToolbar){
        _inputToolbar=[[PubulicInputToolbar alloc] init];
        _inputToolbar.textViewMaxLine = 3;
        _inputToolbar.fontSize = 18;
        _inputToolbar.placeholder = @"写评论...";
        kWeakSelf(weakSelf);
        [_inputToolbar inputToolbarSendText:^(NSString * _Nonnull text) {
            // 清空输入框文字
            [weakSelf.inputToolbar bounceToolbar];
        }];
    }
    return _inputToolbar;
}
-(CommentsBottomView*)bottomView{
    if(!_bottomView){
        _bottomView=[[CommentsBottomView alloc] initWithFrame:CGRectZero];
        kWeakSelf(weakSelf);
        [_bottomView settextFieldEnabled:^{
            [weakSelf.inputToolbar popToolbar];
        }];
    }
    return _bottomView;
}
@end

#pragma mark ---ImageAndTextDetailOneCell

#import "UserIconAndNameView.h"
#import "LikeAndNotLikeView.h"
#import "HewardPayNumberController.h"
#import <RZColorful/RZColorful.h>

@interface ImageAndTextDetailOneCell ()<UIWebViewDelegate>

/**标题文字*/
@property (nonatomic,strong)UILabel*topTitleLabel;
/**用户视图*/
@property (nonatomic,strong)UserIconAndNameView*userView;

/**临时文字背景视图*/
@property (nonatomic,strong)UIView*tempView;
/**富文本内容显示*/
@property (nonatomic,strong)UILabel*contexLabel;
/**<#属性#>*/
@property (nonatomic,strong) LikeAndNotLikeView * likeView;
@end

@implementation ImageAndTextDetailOneCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setSeparatorInset:UIEdgeInsetsMake(0, KScreenWidth, 0, 0)];
        [self createUI];
    }
    return self;
}
-(void)setModel:(HomeRecomedModel *)model{
    _model = model;
    if (StrValid(model.contenx)) {
        DLog(@"%@",model.contenx);
        self.topTitleLabel.text = model.title;
        self.contexLabel.attributedText = model.attrstr;
        self.tempView.hidden = YES;
        self.contexLabel.hidden =NO;
        [self.contexLabel sizeToFit];
        [self.likeView mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.contexLabel.mas_bottom).offset(24);
        }];
    }
}
-(void)createUI{

    self.tempView = [self createTempView];
    
    self.likeView = [[LikeAndNotLikeView alloc] initWithFrame:CGRectZero];
    
    UIView * dsView = [self createDSView];
    dsView.layer.borderColor = UIColorFromRGB(0xE9EEE7).CGColor;
    dsView.layer.borderWidth = 0.5;
    dsView.layer.cornerRadius = 3;


    [self addSubview:self.topTitleLabel];
    [self addSubview:self.userView];
    [self addSubview:self.tempView];
    [self addSubview:self.contexLabel];
    [self addSubview:self.likeView];
    [self addSubview:dsView];

    [self.topTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(16);
        make.right.mas_equalTo(-16);
    }];
    [self.userView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(self.topTitleLabel.mas_bottom);
        make.right.mas_equalTo(0);
    }];
    [self.tempView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(self.userView.mas_bottom);
    }];
    [self.contexLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(self.topTitleLabel);
        make.top.mas_equalTo(self.userView.mas_bottom);
    }];
    [self.likeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(68);
        make.right.mas_equalTo(-68);
        make.top.mas_equalTo(self.tempView.mas_bottom).offset(24);
    }];
    
    [dsView mas_makeConstraints:^(MASConstraintMaker *make) {
       make.left.right.mas_equalTo(self.topTitleLabel);
       make.top.mas_equalTo(self.likeView.mas_bottom).offset(16);
        make.bottom.mas_equalTo(-16);

    }];

}
#pragma mark ---懒加载
-(UILabel*)topTitleLabel{
    if(!_topTitleLabel){
        _topTitleLabel=[UILabel new];
        _topTitleLabel.textColor = UIColorFromRGB(0x273323);
        _topTitleLabel.font = PingFangSC_Medium(18);
        _topTitleLabel.numberOfLines = 0;
        _topTitleLabel.attributedText = [TitleTool getAttributeStringLineSpacing:4 title:@"香蕉还有如此妙用，教你秘制脆皮香蕉，新做法，连吃十天也不腻" titleColor:UIColorFromRGB(0x273323) titleFont:BOLDSYSTEMFONT(18)];
    }
    return _topTitleLabel;
}
-(UILabel*)contexLabel{
    if(!_contexLabel){
        _contexLabel=[UILabel new];
        _contexLabel.hidden = YES;
        _contexLabel.numberOfLines = 0;
    }
    return _contexLabel;
}
-(UserIconAndNameView*)userView{
    if(!_userView){
        _userView=[[UserIconAndNameView alloc] initWithFrame:CGRectZero];
        _userView.dynamicData.text = @"美食达人";
        [_userView.deleButton setBackgroundImage:IMAGE_NAMED(@"guanzhu_bg") forState:UIControlStateNormal];
        [_userView.deleButton setTitle:@"关注" forState:UIControlStateNormal];
        [_userView.deleButton setTitleColor:UIColorFromRGB(0xFFFFFF) forState:UIControlStateNormal];
        _userView.deleButton.titleLabel.font = SYSTEMFONT(14);
        [_userView.deleButton addActionHandler:^{
            
        }];

    }
    return _userView;
}

-(UIView *)createTempView{
    UIView * view = UIView.new;
    //正式对接接口后的数据，这个位置换成富文本显示图文混合内容

    UILabel * oneLabel = [self createLabel:@"一个月前谢了一篇莫名其妙的就“火”了，很是“诚惶诚恐”。\n""评论中有人叫我""小姐姐”“，纠正一下，我是一个货真价实的老阿姨，年近六旬。今天教大家一些在外面吃贵，但是在家只需要几块钱的美食~\n在家自己做马卡龙。"];
    UILabel * twoLabel = [self createLabel:@"马卡龙（Macarons，又称作玛卡龙、杏仁小圆饼、少女的酥胸），是一种用蛋白、杏仁粉、白砂糖和糖霜所做的意大利甜点，通常在两块饼干之间夹有水果酱或奶油等内馅，其外皮酥脆，里面柔软。"];
    UILabel * thereLabel = [self createLabel:@"马卡龙（Macarons，又称作玛卡龙、杏仁小圆饼、少女的酥胸），是一种用蛋白、杏仁粉、白砂糖和糖霜所做的意大利甜点，通常在两块饼干之间夹有水果酱或奶油等内馅，其外皮酥脆，里面柔软。"];
    
    UIImageView * oneImage = [[UIImageView alloc] initWithImage:IMAGE_NAMED(@"dynamicDefut")];
    oneImage.image = IMAGE_NAMED(@"dynamic19");
    UIImageView * twoImage = [[UIImageView alloc] initWithImage:IMAGE_NAMED(@"dynamicDefut")];
    twoImage.image = IMAGE_NAMED(@"dynamic16");

    [view addSubview:oneLabel];
    [view addSubview:twoLabel];
    [view addSubview:thereLabel];
    [view addSubview:oneImage];
    [view addSubview:twoImage];

    [oneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(16);
        make.right.mas_equalTo(-16);
        make.top.mas_equalTo(0);
    }];
    [oneImage mas_makeConstraints:^(MASConstraintMaker *make) {
       make.left.right.mas_equalTo(oneLabel);
       make.top.mas_equalTo(oneLabel.mas_bottom).offset(16);
        make.height.mas_equalTo(230);
    }];
    [twoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(oneLabel);
        make.top.mas_equalTo(oneImage.mas_bottom).offset(16);
    }];
    [twoImage mas_makeConstraints:^(MASConstraintMaker *make) {
       make.left.right.mas_equalTo(oneLabel);
       make.top.mas_equalTo(twoLabel.mas_bottom).offset(16);
        make.height.mas_equalTo(230);
    }];
    [thereLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(oneLabel);
        make.top.mas_equalTo(twoImage.mas_bottom).offset(16);
        make.bottom.mas_equalTo(0);
    }];

    
    return view;
}
-(UILabel *)createLabel:(NSString *)text{
    UILabel * label = UILabel.new;
    label.textColor = UIColorFromRGB(0x273323);
    label.font = SYSTEMFONT(14);
    label.numberOfLines = 0;
    label.attributedText = [TitleTool getAttributeStringLineSpacing:4 title:text titleColor:UIColorFromRGB(0x273323) titleFont:SYSTEMFONT(14)];
    return label;
}
/// 打赏
-(UIView *)createDSView{
    UIView * view = UIView.new;
    
    UserIconAndNameView * topView = [[UserIconAndNameView alloc] initWithFrame:CGRectZero];
    topView.dynamicData.text = @"美食达人";
    [topView.deleButton setBackgroundImage:IMAGE_NAMED(@"guanzhu_bg") forState:UIControlStateNormal];
    [topView.deleButton setTitle:@"打赏" forState:UIControlStateNormal];
    [topView.deleButton setTitleColor:UIColorFromRGB(0xFFFFFF) forState:UIControlStateNormal];
    topView.deleButton.titleLabel.font = SYSTEMFONT(14);
    kWeakSelf(weakSelf);
    [topView.deleButton addActionHandler:^{
        [[weakSelf getCurrentViewController].navigationController pushViewController:[HewardPayNumberController new] animated:YES];
    }];
    
    UIView * line = UIView.new;
    line.backgroundColor = UIColorFromRGB(0xE9EEE7);
    
    UIView * bottomView = [self dashangCishuView];
    [view addSubview:topView];
    [view addSubview:line];
    [view addSubview:bottomView];
    
    [topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.mas_equalTo(0);
    }];

    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(12);
        make.right.mas_equalTo(-16);
        make.height.mas_equalTo(0.5);
        make.top.mas_equalTo(topView.mas_bottom).offset(0);
    }];
    
    [bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(22);
        make.top.mas_equalTo(line.mas_bottom).offset(12);
        make.right.mas_equalTo(line);
        make.bottom.mas_equalTo(-16);
    }];
    
    return view;
}
-(UIView *)dashangCishuView{
    UIView * view =  UIView.new;
    NSArray * array = [NSArray arrayWithObjects:@"user25",@"user22",@"user27",@"user23",@"user21", nil];
    CGFloat width = 34;
    UILabel * rightLabel = UILabel.new;
    rightLabel.text = @"共6次打赏";
    rightLabel.textColor = UIColorFromRGB(0x273323);
    rightLabel.font = SYSTEMFONT(12);
    for (NSInteger i = 0; i< array.count; i++) {
        UIImageView * imageview = UIImageView.new;
//        imageview.layer.cornerRadius = width/2;
//        imageview.layer.masksToBounds = YES;
        ViewBorderRadius(imageview, width/2, 1, KWhiteColor);
        imageview.image = IMAGE_NAMED(array[i]);
        [view addSubview:imageview];
        
        if (i%2 == 0) {
//            imageview.backgroundColor = KGrayColor;
        }else{
//            imageview.backgroundColor = KRedColor;
            
        }
        
        CGFloat x = (width/2)*i;
        
        [imageview mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(x);
            make.top.bottom.mas_equalTo(0);
            make.width.height.mas_equalTo(34);
            
        }];
    }
    
    [view addSubview:rightLabel];
    
    [rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-16);
        make.centerY.mas_equalTo(0);
    }];
    
    return view;
}
@end

#pragma mark ---AdvertisingCell

@interface AdvertisingCell ()
/**广告图片*/
@property (nonatomic,strong)UIImageView*AdvertisingImage;
/**广告文字*/
@property (nonatomic,strong)UILabel*AdvertisingLabel;
@end

@implementation AdvertisingCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createUI];
    }
    return self;
}
-(void)createUI{
    UIView * bgView = UIView.new;
    bgView.layer.cornerRadius = 4;
    bgView.layer.borderWidth = 0.5;
    bgView.layer.borderColor = UIColorFromRGB(0xE9EEE7).CGColor;
    
    [self addSubview:bgView];
    
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(16);
        make.right.bottom.mas_equalTo(-16);
    }];
    
    self.AdvertisingImage = [self createAdverImage];
//    self.AdvertisingImage.backgroundColor = KBlueColor;
    self.AdvertisingImage.image = IMAGE_NAMED(@"dynamic3");
    
    [bgView addSubview:self.AdvertisingImage];
    [bgView addSubview:self.AdvertisingLabel];
    
    [self.AdvertisingImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(12);
        make.top.mas_equalTo(16);
        make.right.mas_equalTo(-12);
        make.height.mas_equalTo(160);
    }];
    [self.AdvertisingLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(self.AdvertisingImage);
        make.top.mas_equalTo(self.AdvertisingImage.mas_bottom).offset(8);
        make.bottom.mas_equalTo(-16);
    }];

    
    
}
-(UIImageView * )createAdverImage{
    UIImageView * imageView = UIImageView.new;
    UIButton * deleBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [deleBtn setBackgroundImage:IMAGE_NAMED(@"icon_quxiao") forState:UIControlStateNormal];
    
    UILabel * label = UILabel.new;
    label.text = @"广告";
    label.backgroundColor = UIColorFromRGB(0x000000);
    label.textColor = KWhiteColor;
    label.textAlignment =NSTextAlignmentCenter;
    label.font = SYSTEMFONT(11);
    
    [imageView addSubview:deleBtn];
    [imageView addSubview:label];
    
    [deleBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-8);
        make.top.mas_equalTo(8);
    }];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.right.mas_equalTo(-8);
        make.height.mas_equalTo(16);
        make.width.mas_equalTo(28);
    }];

    return imageView;
}
-(UILabel*)AdvertisingLabel{
    if(!_AdvertisingLabel){
        _AdvertisingLabel=[UILabel new];
        _AdvertisingLabel.textColor = UIColorFromRGB(0x273323);
        _AdvertisingLabel.font = SYSTEMFONT(14);
        _AdvertisingLabel.numberOfLines = 0;
        _AdvertisingLabel.text = @"马卡龙（Macarons，又称作玛卡龙、杏仁小圆饼、少女的酥胸），是一种用蛋白、杏仁粉、白砂…";
    }
    return _AdvertisingLabel;
}
@end

#pragma mark --leftTextAnRightImageViewCell

@interface leftTextAnRightImageViewCell ()
/**左边文字*/
@property (nonatomic,strong)UILabel*leftLabel;
/**右边图片*/
@property (nonatomic,strong)UIImageView*rightImage;
@end

@implementation leftTextAnRightImageViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;

        self.rightImage = UIImageView.new;
//        self.rightImage.backgroundColor = KGrayColor;
        self.rightImage.image = IMAGE_NAMED(@"dynamic15");
        
        [self addSubview:self.leftLabel];
        [self addSubview:self.rightImage];
        
        [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.mas_equalTo(16);
            make.bottom.mas_equalTo(self.rightImage);
            make.right.mas_equalTo(self.rightImage.mas_left).offset(-16);
        }];
        [self.rightImage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(16);
            make.right.bottom.mas_equalTo(-16);
            make.height.mas_equalTo(84);
            make.width.mas_equalTo(112);
        }];
    }
    return self;
}
#pragma mark --懒加载

-(UILabel*)leftLabel{
    if(!_leftLabel){
        _leftLabel=[UILabel new];
        _leftLabel.textColor = UIColorFromRGB(0x273323);
        _leftLabel.font = PingFangSC_Medium(18);
        _leftLabel.numberOfLines = 0;
        _leftLabel.text = @"做烤鸡的时候，千万别直接放进烤箱，多加一步，鸡肉更加入味";
        
    }
    return _leftLabel;
}
@end
